<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
	<meta name="viewport"
		content="width=device-width,initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-touch-fullscreen" content="yes">
	<meta name="format-detection" content="telephone=no">
	<title>宝宝起名</title>
	<!--[if lt IE 9]>  
        <script src="http://cdn.bootcss.com/html5shiv/r29/html5.js"></script>
        <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>    
    <![endif]-->
	<link rel="stylesheet" href="__PUBLIC__/css/ZM_share.css" />
	<link rel="stylesheet" href="__PUBLIC__/css/YD_calendar.min.css" />
	<script src="__PUBLIC__/js/YD_calendar.min.js"></script>
	<script src="__PUBLIC__/js/jquery.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/rem.js"></script>
	<script src="__PUBLIC__/js/layer/layer.js"></script>
	<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
	<style>
		body {
			background-color: #F6F0EA;
		}

		.main_title {
			width: 100%;
			margin: 0.2rem 0;
			padding: 0 0.1rem;
			box-sizing: border-box;
			-webkit-box-sizing: border-box;
			-moz-box-sizing: border-box;
			-ms-box-sizing: border-box;
			-o-box-sizing: border-box;
		}

		.main_title img {
			vertical-align: middle;
		}

		.zm_form .zm_form_wrap {
			border: 1px solid #FBD5D9;
			border-radius: 5px;
			background-color: #ffffff;
		}

		.zm_form .zm_form_wrap ul {
			border: none;
		}

		.zm_form .zm_form_wrap ul li {
			padding: 5px;
			border-bottom: solid 1px #CFCFCF;
		}

		.zm_form .zm_form_wrap ul li:nth-last-child(1) {
			border-bottom: none;
		}

		.zm_form .zm_form_wrap ul li .form_auto span i {
			border-color: #E9D2AF;
		}

		.zm_form .zm_form_wrap ul li .form_left {
			color: #AD2F2F;
			width: 25%;
			font-weight: 700;
		}

		.innum {
			width: 100%;
			line-height: 0.6rem;
			font-size: 0.32rem;
			text-align: center;
			margin: 0.2rem 0 0 0;
			color: #333;
		}

		.innum b {
			color: #d92d2d;
		}

		.cs_btn {
			background: #DB4852;
			border-radius: 5px;
		}

		.cs_btn a {
			font-size: 18px;
			font-weight: bold;
			color: #fff;
			text-decoration: none;
		}

		.xmcs_list {
			margin-bottom: 15px;
			padding: 0 0.2rem;
		}

		.xmcs_list:first-child {
			padding-top: 0.3rem;
		}

		.xmcs_list img {
			vertical-align: middle;
		}

		.hot_cs {
			background-color: #FAEFEB;
		}
		.sex-wrap{
			display: flex;
			width: 100%;
		}
		.sex-wrap .form_auto {
			flex:auto
		}
		.birth-st span{
			width: 2rem !important;
		}
		.show_qr_btn{
    position: fixed;
    right: 5vw;
    top: 65%;
    z-index: 1;
    width: 1.22rem;
    display: block;
    height: auto;
}
	</style>
</head>

<body>
	<header class="share_header">
		<h1 class="zm">宝宝起名</h1>
		<a href="<!--{:U('BbqmDL/index','',false)}-->" class="zm_titel"></a>
		<a href="<!--{:U('BbqmDL/mycesuan','',false)}-->" class="zm_cs">我的测算</a>
	</header>
	<div class="zm_banner">
		<img src="__PUBLIC__/images/bbqm_img/banner.png" width="100%" />
	</div>
	<!-- <div class="main_title" id="scrollT"><img src="__PUBLIC__/images/bbqm_img/img_jianjie.png" alt="" width="100%"></div> -->
	<div class="main_title" id="scrollT"><img src="__PUBLIC__/images/bbqm_img/img_jianjie1.png" alt="" width="100%"></div>
	<main>
		<section>
			<form id="_form" class="zm_form" action="<!--{:U('BbqmDL/bbqm_zhifu','',false)}-->" method="post">
				<div class="zm_form_wrap">
					<ul>
						<li>
							<div class="form_left">宝宝姓氏</div>
							<div class="form_auto">
								<input type="text" class="bg_no" placeholder="请输入姓氏(汉字)" maxlength="2" id="username" name="username" />
							</div>
						</li>
						<li class="birth-st">
							<div class="form_left birth-st">出生状态</div>
							<div class="form_auto zt">
								<span class="on" id="btn-done" data-value="1">
									<i></i>
									<font>已出生</font>
								</span>
								<span id="btn-doing" data-value="0">
									<i></i>
									<font>未出生</font>
								</span>
								<input type="hidden" id="zt" name="zt" value="1" />
							</div>
						</li>
						<li class='sex-wrap'>
							<div class="form_left">宝宝性别</div>
							<div class="form_auto ">
								<span class="on" id="but_man" data-value="1">
									<i></i>
									<font>男</font>
								</span>
								<span id="but_woman" data-value="0">
									<i></i>
									<font>女</font>
								</span>
								<span id="but_unknown" style='display: none' data-value="2">
										<i></i>
										<font>未知</font>
								</span>
								<input type="hidden" id="sex" name="gender" value="1" />
							</div>
						</li>
						<li>
							<div class="form_left csrq">出生日期</div>
							<div class="form_auto">
								<div type="text" class="Js_date" id="datetime" data-date="1985-04-18-7" data-id="birthday">请选择宝宝的出生日期
								</div>
								<input type="hidden" id="birthday" name="birthday" value="">
							</div>
						</li>
						<li>
							<div class="form_left">请输入</div>
							<div class="form_auto">
								<input type="text" class="bg_no phone" placeholder="手机号码/微信/邮箱" name="phone" />
							</div>
						</li>
						<li>
							<div class="form_left">套餐选择</div>
							<div class="form_auto">
								<input type="text" class="bg_no" readonly name="setmeal" value="一举成名套餐" />
							</div>
						</li>
					</ul>
					<div class="setmeal_wrap">
						<div class="setmeal_item on" data-value="一举成名套餐">
							<h3 class="setmeal_title">【一举成名 (基础取名) 】<span class="item_money">198元</span></h3>
							<div class="fenxi_wrap">
								<div class="fenxi_item">宝宝八字五行分析</div>
								<div class="fenxi_item">三才五格分析</div>
								<div class="fenxi_item">八字基础运势分析</div>
								<div class="fenxi_item">喜用神分析</div>
							</div>
							<p class="fenxi_fonter">首批: <span>4个大名+2个小名</span><span>(1~2个工作日出起名结果，1周内起名满意为止)</span></p>
						</div>
						<div class="setmeal_item" data-value="赫赫有名套餐">
							<h3 class="setmeal_title">【赫赫有名 (耐人寻味，高雅优美) 】<span class="item_money">398元</span></h3>
							<div class="fenxi_wrap">
								<div class="fenxi_item">八字喜用神分析</div>
								<div class="fenxi_item">音型义分析</div>
								<div class="fenxi_item">三才五格分析</div>
								<div class="fenxi_item">基础开运指南</div>
								<div class="fenxi_item">神煞吉凶调运分析</div>
							</div>
							<p class="fenxi_fonter">首批: <span>6个大名,赠送2个小名</span><span>(1~2个工作日出起名结果，1个月内起名满意为止)</span></p>
						</div>
					</div>
					<style>
						.setmeal_wrap {
							margin: 0 0.2rem 0.4rem;
						}

						.setmeal_item {
							padding: 0.2rem;
							border: 1px solid #E95167;
							border-radius: 0.12rem;
							background: url('__PUBLIC__/images/bbqm_img/img_beijing.png') no-repeat;
							background-size: 100% 100%;
							position: relative;
							overflow: hidden;
							margin-bottom: 0.2rem;
						}

						.setmeal_item.on::after {
							content: '√';
							width: 2rem;
							height: 0.86rem;
							text-align: center;
							line-height: 0.86rem;
							position: absolute;
							right: -0.65rem;
							top: -0.1rem;
							color: #ffffff;
							background-color: #E95167;
							transform: rotate(45deg)
						}

						setmeal_item:nth-last-child(1) {
							margin-bottom: 0;
						}

						.setmeal_item .setmeal_title {
							font-size: 0.28rem;
							color: #e63851;
							font-weight: 700;
							line-height: 1.5;
						}

						.setmeal_item .setmeal_title .item_money {
							font-size: 0.36rem;
							color: #e63851;
							font-weight: 400;
						}

						.fenxi_wrap {
							width: 5rem;
							background-color: #ffffff;
							border-radius: 0.12rem;
							padding: 0.2rem 0.12rem;
							box-sizing: border-box;
							overflow: hidden;
							display: flex;
							flex-wrap: wrap;
							justify-content: space-between;
							margin: 0.2rem 0;
						}

						.fenxi_wrap .fenxi_item {
							width: 48%;
							font-size: 0.22rem;
							color: #333333;
						}

						.fenxi_wrap .fenxi_item:nth-child(odd) {
							margin-bottom: 0.2rem;
						}

						.fenxi_wrap .fenxi_item:nth-last-child(1) {
							margin-bottom: 0;
						}

						.fenxi_wrap .fenxi_item:nth-last-child(2) {
							margin-bottom: 0;
						}

						.fenxi_wrap .fenxi_item::before {
							content: '';
							width: 0.18rem;
							height: 0.18rem;
							display: inline-block;
							border: 1px solid #000000;
							background-color: #000000;
							box-shadow: 0rem 0rem 0 0.03rem #ffffff inset;
							margin-right: 0.1rem;
							vertical-align: middle;
						}

						.fenxi_fonter {
							font-size: 0.2rem;
							color: #333333;
						}

						.fenxi_fonter span:nth-child(1) {
							color: #E95868;
						}

						.fenxi_fonter span:nth-child(2) {
							color: #666666;
						}
					</style>
				</div>
			</form>
			<div class="cs_btn"><a href="javascript:;" class="mg_btn">申请起名</a></div>
			<div class="innum">目前已有<b>
					<!--{$Think.cookie.bbqmcs}--></b>人查看姓名测算分析</div>
		</section>
		<section>
			<div class="xmcs_list"><img src="__PUBLIC__/images/bbqm_img/img_TP1.png" alt="" width="100%"></div>
			<div class="xmcs_list"><img src="__PUBLIC__/images/bbqm_img/img_TP2.png" alt="" width="100%"></div>
			<div class="xmcs_list"><img src="__PUBLIC__/images/bbqm_img/img_TP3.png" alt="" width="100%"></div>
			<div class="xmcs_list"><img src="__PUBLIC__/images/bbqm_img/img_TP4.png" alt="" width="100%"></div>
			<div class="xmcs_list"><img src="__PUBLIC__/images/bbqm_img/img_TP5.png" alt="" width="100%"></div>
			<div class="xmcs_list"><img src="__PUBLIC__/images/bbqm_img/img_TP6.png" alt="" width="100%"></div>
			<div class="xmcs_list"><img src="__PUBLIC__/images/bbqm_img/img_TP7.png" alt="" width="100%"></div>
		</section>
		<img class='show_qr_btn' src="__PUBLIC__/images/bbqm_img/v5/wxicon.png" alt="">
	</main>
	<!-- 提示收藏 -->
	<include file="Public/index_SC" />

	<!-- 热门测算 -->
	<div class="hot_cs">
		<include file="Public/zhiming" />
	</div>
	<!-- 脚 -->
	<footer class="footer_severs">
		<include file="Public/bottom-index" />
	</footer>
	<div class="fiex_bt" id="fiex">
		<a href="javascript:;">立即测算</a>
	</div>
	<script>
		//测算底部悬浮
		$(function () {
			var topShow = $(".cs_btn");
			if (topShow.length) {
				var topShow = topShow.offset().top;
				var testBtn = $("#fiex");
				$(window).scroll(function () {
					var wt = $(window).scrollTop();
					wt > topShow ? (testBtn.fadeIn(), $('.footer_severs').css('padding-bottom', '1.2rem')) : (testBtn
						.fadeOut(), $('.footer_severs').css('padding-bottom', '0.4rem'));
				});
				// goTop
				$('#fiex').on('click', function () {
					$('html,body').animate({
						scrollTop: $('#scrollT')[0].offsetTop
					}, 500)
				});
			}
		});

		$('.setmeal_item').on('click', function () {
			$('.setmeal_item').removeClass('on');
			$(this).addClass('on');
			$("[name='setmeal']").val($(this).attr('data-value'))
		})
		$(".cs_btn").on('click', function () {
			if ($("[name='username']").val() == "") {
				layer.msg("请输入宝宝姓氏");
				return false;
			}
			var patrn = /[\u4E00-\u9FA5]/;
			if (!patrn.exec($("[name='username']").val())) {
				layer.msg("请输入中文姓氏");
				return false;
			}
			if ($("[name='birthday']").val() == "") {
				layer.msg("请选择宝宝生时");
				return false;
			}
			let wxReg = new RegExp(/^[a-zA-Z]{1}[-_a-zA-Z0-9]{5,19}$/);
			let emailReg = new RegExp(/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/);
			let phoneReg = new RegExp(/^((1[3,5,8][0-9])|(14[5,7])|(17[0,6,7,8])|(19[7]))\d{8}$/);
			let contact = $('.phone').val();
			if (contact == "") {
				layer.msg("联系方式不能为空");
				return false;
			} else if (!emailReg.test(contact) && !phoneReg.test(contact) && !wxReg.test(contact)) {
				console.log(contact)
				layer.msg("请填写正确联系方式，便于大师联系。");
				return false;
			}
			var oli = layer.load();
			setTimeout(function () {
				layer.closeAll('loading');
				layer.msg('订单提交成功', {
					icon: 1
				});
				setTimeout(function () {
					document.getElementById('_form').submit();
				}, 1300);
			}, 1000);
		});

		// 时间
		var calendar1 = new lCalendar().init('#datetime'); //男
		var obut_man = document.getElementById('but_man');
			var obut_woman = document.getElementById('but_woman');
			var un =document.getElementById('but_unknown');
			var osex = document.getElementById('sex');
			obut_man.onclick = function(){
					obut_man.classList.add("on");
					osex.value = 1;
					un.classList.remove('on');
					obut_woman.classList.remove('on');
			}
			obut_woman.onclick = function(){
					obut_woman.classList.add("on");
					osex.value = 0;
					obut_man.classList.remove('on');
					un.classList.remove('on');
			};
			un.onclick = function(){
					un.classList.add("on");
					osex.value = 2;
					obut_man.classList.remove('on');
					obut_woman.classList.remove('on');
			};
		// 选择按钮 出生状态
		var odone = document.getElementById('btn-done');
        var odoing = document.getElementById('btn-doing');
        var ozt = document.getElementById('zt');
        odone.onclick = function(){
            odone.classList.add("on");
            ozt.value = 1;
						$('.csrq')[0].innerText = '出生日期'
						console.log('$("#datetime")')
						// console.log($("#datetime"))
						$("#datetime")[0].innerText ='请选择宝宝的出生日期'
            $('#but_unknown').hide()
            odoing.classList.remove('on');
        }
        odoing.onclick = function(){
            odoing.classList.add("on");
            ozt.value = 0;
            $('#but_unknown').show()
						$('.csrq')[0].innerText = '预产期'
						$("#datetime")[0].innerText ='请选择宝宝的预产期'
            odone.classList.remove('on');
				};
				$('.show_qr_btn').on('click',function(){
        console.log('img.show_qr_btn')
        console.log()
        $('.close_container').show();
    })
    $('.top-wx').click(function(){
        $('.close_container').show();
    })
	</script>
</body>

</html>